home *** CD-ROM | disk | FTP | other *** search
- {TValidator Component for Borland Delphi.
- A MUST component for shareware developers.
- Simplifies software validation process.
- Shareware.
- Version 1.0
- (C) Artchil Gogava, 1995
- compuserve: 75231,330
- internet: 75231.330@compuserve.com}
-
- unit Valid;
-
- interface
-
- uses
- SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
- Forms, Dialogs, ValidDlg, ValMisc, IniFiles;
-
- const
- {Name of section in .INI file}
- ValSectionName = 'Validation';
-
- type
- TValidator = class(TComponent)
- private
- { Private declarations }
- FRandSeed : LongInt;
- FIniFileName : string;
- FOnVldOk : TNotifyEvent;
- FOnVldFailed : TNotifyEvent;
- procedure DoVldOk(Sender : TObject);
- procedure DoVldFailed(Sender : TObject);
- procedure SetIniFileName(Value : string);
- procedure UpdateValues;
- procedure GetValues;
- protected
- { Protected declarations }
- RegNumber : string;
- public
- { Public declarations }
- UserName : string; {is public - can be used everywhere}
- constructor Create(AOwner : TComponent); override;
- function IsValidated : boolean; {Checks if program has been validated}
- procedure Validate; {Runs validation/registration dialog box}
- procedure Devalidate; {Devalidates program}
- published
- { Published declarations }
- property RandSeed : LongInt read FRandSeed
- write FRandSeed default 0;
- {Random Seed - Used to calculate RegNumber}
- property IniFileName : string read FIniFileName
- write SetIniFileName;
- {Name if ini file to stare reginstration info}
- property OnVldOk : TNotifyEvent read FOnVldOk
- write FOnVldOk;
- {Determines what happens if validation is OK}
- property OnVldFailed : TNotifyEvent read FOnVldFailed
- write FOnVldFailed;
- {Determines what happens if validation failed}
- end;
-
- procedure Register;
-
- implementation
-
-